import request from "@/api/request";

const url = "/wiki/web"

export function docs(query) {
    return request({
        url: `${url}/wiki/doc/all`,
        method: 'get',
        params: query
    })
}

export function update(doc) {
    return request.put(`${url}/wiki/doc`,doc)
}

export function save(doc) {
    return request.post(`${url}/wiki/doc`,doc)
}

export function remove(docId){
    return request.delete(`${url}/wiki/doc/${docId}`)
}

export function doc(docId){
    return request.get(`${url}/wiki/doc/${docId}`)
}
